package com.springmvc.shangguigu.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * SpringMvcViewResolver--SpringMVC-test
 *
 * @author: Jovi
 * @createTime: 2018-09-05 15:23
 **/
@Controller
@RequestMapping("/springmvcViewResolver")
public class SpringMvcViewResolver {

    private static final String SUCCESS = "shangguigu/success";

    @RequestMapping("/testViewAndViewResolver")
    public String testViewAndViewResolver() {
        System.out.println("testViewAndViewResolver");
        return SUCCESS;
    }

    @RequestMapping("/testView")
    public String testView() {
        System.out.println("testView");
        return "helloView";
    }

    @RequestMapping("/testRedirect")
    public String testRedirect() {
        System.out.println("testRedirect");
        return "redirect:/shangguigu/index.jsp";
    }
}
